//BEN NOTE:
//In any .h file, you want to have the following two lines of code, as
//well as the "#endif" at the end.  This is to make sure that in case
//certain classes are accidentally included twice, you do not actually
//include them twice, taking up a lot of memory.

#ifndef MYROBOT_H
#define MYROBOT_H

//BEN NOTE:
//Only "defines.h", "WPILib.h", and <math.h> are actually used, but I'm
//keeping in the other #include just in case. 
//If you want to import more things for whatever reason, look in 
//"Includes" (located in this class), 
//"C:/WindRiver/vxworks-6.3/target/h/WPIlib."
//I doubt you'll need to import anything, but if you do, follow
//the forward slash format established in the following #includes.

#include "defines.h"
#include "WPILib.h"
#include "Dashboard.h"
#include "DashboardDataSender.h"
#include "Vision2009\AxisCamera.h"
#include "Vision\HSLImage.h"
#include <math.h>

class Robot:public IterativeRobot
{
public:
	Robot();
	~Robot();
	double GetPeriod();
	void AutonomousContinuous();
	void AutonomousInit();
	void AutonomousPeriodic();
	void DisabledContinuous();
	void DisabledInit();
	void DisabledPeriodic();
	void RobotInit();
	void SetPeriod(double period);
	void TeleopContinuous();
	void TeleopInit();
	void TeleopPeriodic();
	
//Not required functions added by Asya/Paul/Andy
	void clampSpeeds();
	
//BEN NOTE:
//All non-primitive data types must be declared with an asterisk.  This means
//that the variable isn't actually an instance of the given class.  Rather, 
//it is a pointer to that class.  This means that the following lines
//should be read as "the CANJaguar value pointed to by JagFL", rather than 
//JagFL. JagFL itself is a pointer, which means something that "points" to the
//address of the variable.  The "*" designates "the value of type <> 
//pointed to by". This basically means that JagFL will automatically store
//the accessible address of the corresponding CANJaguar rather than the
//large class itself.
//See the .cpp class for more details as to why this is important.

//ADDITIONAL INFORMATION: (Not really necessary.)
//Pointers must have the data type they are accessing. They contain the
//address of the starting memory space of an object.  In order to know
//how much memory they should extend their definition of the object to,
//they must know the data type of the object (how much space it takes up.)
	
	DashboardDataSender* dds;
	
	CANJaguar* JagFL;
	CANJaguar* JagFR;
	CANJaguar* JagBL;
	CANJaguar* JagBR;
	CANJaguar* JagARM;
	CANJaguar* JagWRIST;
	Solenoid* Sol;
	Solenoid* Sol2;

	Servo* cam1;
	Servo* cam2;
	DigitalInput* Gage;
	Joystick* Joy;
	Joystick* Joy2;
	Compressor* comp;
	Relay* rel;
	bool constsol;
	int VOLTS;
	int autonomous;
	float flutter;
	
protected:
	
	void _init();
	
//BEN NOTE:
//This argument should read as "float containing a reference to val."
//This literally contains the address of val rather than its value.
//Again, see .cpp class for more details.
	void clamp(float & val);
	
//Wheel Speeds
	float _frSpeed;
	float _flSpeed;
	float _brSpeed;
	float _blSpeed;
	float _maxVolts;
	float _spArm;
	float _spWrist;
	float _armPos;
};

#endif



